package miracle.joker.design.flyweight;

import java.awt.*;

public class Document {

    private LetterFactory letterFactory = new LetterFactory();

    public void render(Graphics graphics) {
        Letter letterA = letterFactory.getLetter('A', 12, Color.RED, 10, 10);
        Letter letterB = letterFactory.getLetter('B', 12, Color.GREEN, 20, 20);
        Letter letterC = letterFactory.getLetter('C', 12, Color.BLUE, 30, 30);

        letterA.draw(graphics);
        letterB.draw(graphics);
        letterC.draw(graphics);
    }
}
